﻿<local:FilterWindow x:Class="WpfApp1.Views.Components.StringFilterWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp1.Views.Components"
        mc:Ignorable="d"
        Icon="\Resources\wb.ico"
        ResizeMode="NoResize"
        Title="Фильтр" Height="155" Width="383">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="90"/>
            <ColumnDefinition Width="219*"/>
            <ColumnDefinition Width="170*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="1.3*"/>
        </Grid.RowDefinitions>

        <Label
               Content="Тип поиска"
               Grid.Column="0" 
               Grid.Row="0" 
               HorizontalContentAlignment="Left" 
               VerticalContentAlignment="Center"></Label>
        <ComboBox Name="cbFilterType" 
                  Grid.Column="1"
                  Grid.Row="0" 
                  Width="250" 
                  Style="{StaticResource CommonComboBox}" 
                  SelectedIndex="0" 
                  Grid.ColumnSpan="2"
                  HorizontalAlignment="Left">
            <ComboBoxItem Name="cbiAll" Content="Без фильтра" />
            <ComboBoxItem Name="cbiEquals" Content="Равно" />
            <ComboBoxItem Name="cbiNotEquals" Content="Не равно" />
            <ComboBoxItem Name="cbiMore" Content="Больше" />
            <ComboBoxItem Name="cbiLess" Content="Меньше" />
            <ComboBoxItem Name="cbiContain" Content="Содержит" />
        </ComboBox>

        <Label
               Content="Значение"
               Grid.Column="0" 
               Grid.Row="1" 
               HorizontalContentAlignment="Right"
               VerticalContentAlignment="Center" ></Label>
        <TextBox x:Name="tbParam"
                 Margin="0 5 0 0" 
                 Grid.Column="1"
                 Grid.Row="1"
                 HorizontalAlignment="Left" 
                 Style="{StaticResource CommonTextBox}" 
                 Width="250"
                 Grid.ColumnSpan="2"/>

        <StackPanel Margin="0 5 0 0"  Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Left" Orientation="Horizontal">
            <Button x:Name="btnFilter" Width="110" Margin="5" Template="{StaticResource commonButton}" Content="Отфильтровать" Click="btnFilter_Click"/>
            <Button x:Name="btnCancel" Width="110" Margin="5" Template="{StaticResource commonButton}" Content="Отмена" Click="btnCancel_Click" />
        </StackPanel>

    </Grid>
</local:FilterWindow>
